// 此处第二个参数vm，就是我们在页面使用的this，你可以通过vm获取vuex等操作，更多内容详见uView对拦截器的介绍部分：
// https://uviewui.com/js/http.html#%E4%BD%95%E8%B0%93%E8%AF%B7%E6%B1%82%E6%8B%A6%E6%88%AA%EF%BC%9F
const http = uni.$u.http
// 此处使用了传入的params参数，一切自定义即可
const getApiQ = (data = {}, config) => http.get('/frontend/login/wechat', {
	params: data,
	...config
});
const getbannerById = (data = {}, config) => http.get('/frontend/banner/get',{
	params: data,
	...config
});
const getUserInfo = (data = {}, config) => http.get('/frontend/user/info', {
	params: data,
	...config
});
const getSamples = (data = {}, config) => http.get('/frontend/samples/list', {
	params: data,
	...config
});
const getOrderByNumber = (data = {}, config) => http.get('/frontend/order/detail', { //根据订单编号 获取订单详情
	params: data,
	...config
});
const getOrderListCount = (data = {}, config) => http.get('/frontend/order/identifiedCount', {
	params: data,
	...config
});
const getCardList = (data = {}, config) => http.get('/frontend/card/list', {
	params: data,
	...config
});
const getUserCardList = (data = {}, config) => http.get('/frontend/card/getUserCards', {
	params: data,
	...config
});
const getCardOrderCount = (data = {}, config) => http.get('/frontend/cardOrder/count', {
	params: data,
	...config
});
const resetOrder = (data = {}, config) => http.get('/frontend/order/reevaluation', {
	params: data,
	...config
});
const change = (data = {}, config) => http.get('/frontend/appraiser/updateAccepted', { //接单
	params: data,
	...config
});
const getIdentifiedCount = (data = {}, config) => http.get('/frontend/appraiser/identifiedCount', { 
	params: data,
	...config
});







const postApiQ = (params = {}, config) => http.post('/frontend/yard/redeemRecord', params, config);
const getUses = (params = {}, config) => http.post('/frontend/card/remainingUses', params, config);
const addOrder = (params = {}, config) => http.post('/frontend/order/addOrder', params, config);
const setUser = (params = {}, config) => http.post('/frontend/user/update', params, config);
const getBanner = (params = {}, config) => http.post('/frontend/banner/list', params, config);
const getOrderIdentified = (params = {}, config) => http.post('/frontend/order/identified', params, config);
const getCardOrderRecordList = (params = {}, config) => http.post('/frontend/cardOrder/record', params, config);
const getMyIdentifyOrderList = (params = {}, config) => http.post('/frontend/order/list', params, config);
const addOrderImage = (params = {}, config) => http.post('/frontend/order/addImage', params, config);
const addComments = (params = {}, config) => http.post('/frontend/comments/addComments', params, config);
const getAppraiserorderList = (params = {}, config) => http.post('/frontend/appraiser/orderList', params, config);
const getAppraiserList = (params = {}, config) => http.post('/frontend/appraiser/AppraiserList', params, config);
const transfers = (params = {}, config) => http.post('/frontend/appraiser/transfers', params, config);
const identify = (params = {}, config) => http.post('/frontend/appraiser/identify', params, config);
const verificationPhoneCode = (params = {}, config) => http.post('/frontend/user/updatePhone', params, config);
const updatePhone = (params = {}, config) => http.post('/frontend/user/phone', params, config);
const updatePassword = (params = {}, config) => http.post('/frontend/user/update/password', params, config);


export default {
	getApiQ, //get示例接口
	getUserInfo,
	postApiQ, //post示例接口
	setUser,
	getSamples,
	getUses,
	addOrder,
	getOrderByNumber,
	getBanner,
	getOrderIdentified,
	getbannerById,
	getOrderListCount,
	getCardList, //获取次卡列表
	getUserCardList, // 获取当前用户所拥有的次卡
	getCardOrderRecordList,//获取充值记录
	getCardOrderCount,//获取当前用户充值总记录
	getMyIdentifyOrderList,//用户的鉴定订单列表
	addOrderImage,
	resetOrder,
	addComments,
	change,
	getIdentifiedCount,
	getAppraiserorderList, // 鉴定师订单列表
	getAppraiserList,  //鉴定师订单列表
	transfers, // 鉴定师转单
	identify, //鉴定师鉴定订单
	updatePassword, //修改密码
	verificationPhoneCode,//验证手机验证码
	updatePhone,//修改手机号
}